/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : localhost:3306
 Source Schema         : standard-basis

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 28/03/2021 18:31:34
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `user_id` bigint(20) DEFAULT NULL COMMENT '操作人ID',
  `user_name` varchar(20) DEFAULT NULL COMMENT '操作人名称',
  `description` varchar(32) DEFAULT NULL COMMENT '操作描述',
  `type` smallint(2) DEFAULT NULL COMMENT '日志类型：1、操作日志。2、异常日志。',
  `ip` varchar(32) DEFAULT NULL COMMENT '操作IP',
  `location` varchar(128) DEFAULT NULL COMMENT '操作地点',
  `browser` varchar(32) DEFAULT NULL COMMENT '浏览器',
  `os` varchar(32) DEFAULT NULL COMMENT '操作系统',
  `action_url` varchar(128) DEFAULT NULL COMMENT '请求地址',
  `request_method` varchar(128) DEFAULT NULL COMMENT '请求方式',
  `params` longtext COMMENT '请求参数',
  `class_path` varchar(128) DEFAULT NULL COMMENT '访问类名',
  `result` longtext COMMENT '响应结果',
  `result_code` smallint(2) DEFAULT NULL COMMENT '操作结果： 0、失败。1、成功。',
  `ex_detail` longtext COMMENT '异常信息',
  `ex_msg` varchar(1024) DEFAULT NULL COMMENT '异常描述',
  `create_time` datetime DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志';

-- ----------------------------
-- Records of sys_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `title` varchar(20) DEFAULT NULL COMMENT '标题',
  `pid` bigint(20) DEFAULT NULL COMMENT '父id',
  `menu_type` smallint(2) DEFAULT NULL COMMENT '类型：1、目录。2、菜单。3、按钮。',
  `path` varchar(128) DEFAULT NULL COMMENT '路由',
  `auth_code` varchar(20) DEFAULT NULL COMMENT '权限标识',
  `icons` varchar(20) DEFAULT NULL COMMENT '图标',
  `seq` int(11) DEFAULT NULL COMMENT '序号',
  `is_hidden` smallint(2) DEFAULT '0' COMMENT '是否隐藏：1、是。0、否。',
  `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统菜单';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (1322770188088639488, '系统管理', 0, 1, '', '', 'system', 10, 0, NULL, '2020-11-01 05:19:23', NULL, '2020-11-01 13:19:23');
INSERT INTO `sys_menu` VALUES (1322774696441151488, '菜单管理', 1322770188088639488, 2, '/sys/menu/index', '', 'sysMenu', 2, 0, NULL, '2020-11-01 05:37:18', NULL, '2020-11-01 13:37:18');
INSERT INTO `sys_menu` VALUES (1322803882748805120, '用户管理', 1322770188088639488, 2, '/sys/user/index', '', 'sysUser', 1, 0, NULL, '2020-11-01 07:33:17', NULL, '2020-11-01 15:33:16');
INSERT INTO `sys_menu` VALUES (1322803959471013888, '角色管理', 1322770188088639488, 2, '/sys/role/index', '', 'sysRole', 3, 0, NULL, '2020-11-01 07:33:35', NULL, '2020-11-01 15:33:35');
INSERT INTO `sys_menu` VALUES (1341661698976645120, '查看', 1322803882748805120, 3, '', 'sysUser-sel', '', 1, 0, NULL, '2020-12-23 08:27:31', NULL, '2020-12-23 16:27:30');
INSERT INTO `sys_menu` VALUES (1341661758183440384, '添加', 1322803882748805120, 3, '', 'sysUser-add', '', 2, 0, NULL, '2020-12-23 08:27:45', NULL, '2020-12-23 16:27:44');
INSERT INTO `sys_menu` VALUES (1341661817880969216, '编辑', 1322803882748805120, 3, '', 'sysUser-upd', '', 3, 0, NULL, '2020-12-23 08:27:59', NULL, '2020-12-23 16:27:58');
INSERT INTO `sys_menu` VALUES (1341661874604736512, '删除', 1322803882748805120, 3, '', 'sysUser-del', '', 4, 0, NULL, '2020-12-23 08:28:12', NULL, '2020-12-23 16:28:12');
INSERT INTO `sys_menu` VALUES (1341670182472384512, '启用/禁用', 1322803882748805120, 3, '', 'sysUser-updState', '', 7, 0, NULL, '2020-12-23 09:01:13', 1323171761340022784, '2021-03-28 16:07:10');
INSERT INTO `sys_menu` VALUES (1341670774750052352, '查看', 1322774696441151488, 3, '', 'sysMenu-sel', '', 1, 0, NULL, '2020-12-23 09:03:34', NULL, '2020-12-23 17:03:34');
INSERT INTO `sys_menu` VALUES (1341670831712894976, '添加', 1322774696441151488, 3, '', 'sysMenu-add', '', 2, 0, NULL, '2020-12-23 09:03:48', NULL, '2020-12-23 17:03:47');
INSERT INTO `sys_menu` VALUES (1341670877279813632, '编辑', 1322774696441151488, 3, '', 'sysMenu-upd', '', 3, 0, NULL, '2020-12-23 09:03:59', NULL, '2020-12-25 08:19:01');
INSERT INTO `sys_menu` VALUES (1341670954782162944, '删除', 1322774696441151488, 3, '', 'sysMenu-del', '', 4, 0, NULL, '2020-12-23 09:04:17', NULL, '2020-12-23 17:04:17');
INSERT INTO `sys_menu` VALUES (1341676015100887040, '查看', 1322803959471013888, 3, '', 'sysRole-sel', '', 1, 0, NULL, '2020-12-23 09:24:24', NULL, '2020-12-23 17:24:23');
INSERT INTO `sys_menu` VALUES (1341676055940825088, '添加', 1322803959471013888, 3, '', 'sysRole-add', '', 2, 0, NULL, '2020-12-23 09:24:34', NULL, '2020-12-23 17:24:33');
INSERT INTO `sys_menu` VALUES (1341676103193853952, '编辑', 1322803959471013888, 3, '', 'sysRole-upd', '', 3, 0, NULL, '2020-12-23 09:24:45', NULL, '2020-12-23 17:24:44');
INSERT INTO `sys_menu` VALUES (1341676166095831040, '删除', 1322803959471013888, 3, '', 'sysRole-del', '', 4, 0, NULL, '2020-12-23 09:25:00', NULL, '2020-12-23 17:24:59');
INSERT INTO `sys_menu` VALUES (1341676232370028544, '权限', 1322803959471013888, 3, '', 'sysRole-saveRoleMenu', '', 5, 0, NULL, '2020-12-23 09:25:16', NULL, '2020-12-23 17:25:15');
INSERT INTO `sys_menu` VALUES (1375355075051913216, '日志管理', 1322770188088639488, 1, '', '', 'operate', 99, 0, 1323171761340022784, '2021-03-26 15:52:57', NULL, '2021-03-26 15:52:57');
INSERT INTO `sys_menu` VALUES (1375355218740379648, '操作日志', 1375355075051913216, 2, '/sys/operation/index', '', 'daiban', 1, 0, 1323171761340022784, '2021-03-26 15:53:32', NULL, '2021-03-26 15:53:31');
INSERT INTO `sys_menu` VALUES (1375355316014678016, '异常日志', 1375355075051913216, 2, '/sys/exception/index', '', 'exception', 2, 0, 1323171761340022784, '2021-03-26 15:53:55', NULL, '2021-03-26 15:53:55');
INSERT INTO `sys_menu` VALUES (1375355672983502848, '查看', 1375355218740379648, 3, '', 'sysLog-sel', '', 1, 0, 1323171761340022784, '2021-03-26 15:55:20', NULL, '2021-03-26 15:55:20');
INSERT INTO `sys_menu` VALUES (1375355753589637120, '删除', 1375355218740379648, 3, '', 'sysLog-del', '', 2, 0, 1323171761340022784, '2021-03-26 15:55:39', NULL, '2021-03-26 15:55:39');
INSERT INTO `sys_menu` VALUES (1375356003612098560, '查看', 1375355316014678016, 3, '', 'sysLog-sel', '', 1, 0, 1323171761340022784, '2021-03-26 15:56:39', NULL, '2021-03-26 15:56:39');
INSERT INTO `sys_menu` VALUES (1376077288730234882, '启用/禁用', 1322803959471013888, 3, '', 'sysRole-updState', '', 6, 0, 1323171761340022784, '2021-03-28 15:42:47', 1323171761340022784, '2021-03-28 15:43:05');
INSERT INTO `sys_menu` VALUES (1376083384261881858, '角色', 1322803882748805120, 3, '', 'sysUser-updRole', '', 6, 0, 1323171761340022784, '2021-03-28 16:07:00', 1323171761340022784, '2021-03-28 16:07:00');
INSERT INTO `sys_menu` VALUES (1376092437398630401, '代码生成器', 0, 1, '', '', 'blog', 10, 0, 1323171761340022784, '2021-03-28 16:42:58', 1323171761340022784, '2021-03-28 16:42:58');
INSERT INTO `sys_menu` VALUES (1376093032561979393, '后端代码生成', 1376092437398630401, 2, '/code/index', '', 'operate', 1, 0, 1323171761340022784, '2021-03-28 16:45:20', 1323171761340022784, '2021-03-28 16:45:20');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `role_name` varchar(20) DEFAULT NULL COMMENT '角色名称',
  `role_type` smallint(2) DEFAULT NULL COMMENT '角色类型：1、系统默认。2、自定义。',
  `state` smallint(1) DEFAULT '1' COMMENT '状态：0、禁用。1、启用。',
  `note` varchar(255) DEFAULT NULL COMMENT '备注',
  `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统角色';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '管理员', 1, 1, '111', 1, '2020-11-01 21:00:07', 1, '2020-11-01 21:00:07');
INSERT INTO `sys_role` VALUES (1323985645063897088, '体验用户', 2, 1, '仅拥有部分查看权限', NULL, '2020-11-04 13:49:11', NULL, '2020-11-04 21:49:10');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '权限ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色权限';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES (1376084506494054401, 1323985645063897088, 1341670774750052352);
INSERT INTO `sys_role_menu` VALUES (1376084506498248705, 1323985645063897088, 1322770188088639488);
INSERT INTO `sys_role_menu` VALUES (1376084506498248706, 1323985645063897088, 1322774696441151488);
INSERT INTO `sys_role_menu` VALUES (1376084506502443009, 1323985645063897088, 1341661698976645120);
INSERT INTO `sys_role_menu` VALUES (1376084506502443010, 1323985645063897088, 1322803882748805120);
INSERT INTO `sys_role_menu` VALUES (1376084506506637314, 1323985645063897088, 1341676015100887040);
INSERT INTO `sys_role_menu` VALUES (1376084506515025921, 1323985645063897088, 1322803959471013888);
INSERT INTO `sys_role_menu` VALUES (1376084506519220225, 1323985645063897088, 1375355075051913216);
INSERT INTO `sys_role_menu` VALUES (1376084506519220226, 1323985645063897088, 1375355672983502848);
INSERT INTO `sys_role_menu` VALUES (1376084506523414530, 1323985645063897088, 1375355218740379648);
INSERT INTO `sys_role_menu` VALUES (1376084642460807169, 1, 1341670774750052352);
INSERT INTO `sys_role_menu` VALUES (1376084642465001474, 1, 1322770188088639488);
INSERT INTO `sys_role_menu` VALUES (1376084642469195778, 1, 1322774696441151488);
INSERT INTO `sys_role_menu` VALUES (1376084642469195779, 1, 1341661698976645120);
INSERT INTO `sys_role_menu` VALUES (1376084642473390081, 1, 1322803882748805120);
INSERT INTO `sys_role_menu` VALUES (1376084642477584385, 1, 1341676015100887040);
INSERT INTO `sys_role_menu` VALUES (1376084642477584386, 1, 1322803959471013888);
INSERT INTO `sys_role_menu` VALUES (1376084642481778690, 1, 1375355075051913216);
INSERT INTO `sys_role_menu` VALUES (1376084642481778691, 1, 1375355672983502848);
INSERT INTO `sys_role_menu` VALUES (1376084642485972993, 1, 1375355218740379648);
INSERT INTO `sys_role_menu` VALUES (1376084642485972994, 1, 1375356003612098560);
INSERT INTO `sys_role_menu` VALUES (1376084642490167298, 1, 1375355316014678016);
INSERT INTO `sys_role_menu` VALUES (1376084642490167299, 1, 1376077288730234882);
INSERT INTO `sys_role_menu` VALUES (1376084642494361601, 1, 1341676103193853952);
INSERT INTO `sys_role_menu` VALUES (1376084642494361602, 1, 1341676055940825088);
INSERT INTO `sys_role_menu` VALUES (1376084642498555906, 1, 1341661758183440384);
INSERT INTO `sys_role_menu` VALUES (1376084642498555907, 1, 1341670831712894976);
INSERT INTO `sys_role_menu` VALUES (1376084642502750210, 1, 1341670877279813632);
INSERT INTO `sys_role_menu` VALUES (1376084642506944514, 1, 1341661817880969216);
INSERT INTO `sys_role_menu` VALUES (1376084642506944515, 1, 1341676232370028544);
INSERT INTO `sys_role_menu` VALUES (1376084642511138817, 1, 1341670182472384512);
INSERT INTO `sys_role_menu` VALUES (1376084642511138818, 1, 1376083384261881858);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `login_name` varchar(20) DEFAULT NULL COMMENT '登录名',
  `login_pass` varchar(50) DEFAULT NULL COMMENT '登录密码',
  `phone_number` varchar(20) DEFAULT NULL COMMENT '手机号',
  `nick_name` varchar(20) DEFAULT NULL COMMENT '昵称',
  `sex` smallint(2) DEFAULT NULL COMMENT '性别 、-1未知。0、女。1、男。',
  `header_img` json DEFAULT NULL COMMENT '头像',
  `state` smallint(1) DEFAULT '1' COMMENT '状态：0、禁用。1、启用。',
  `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统用户';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1323171761340022784, 'super', '9d63e0261afc3ef667917177fc47d1ae', '17335778685', '主宰', 1, NULL, 1, NULL, '2020-11-02 07:55:06', NULL, '2020-12-23 15:11:24');
INSERT INTO `sys_user` VALUES (1376086512449355776, 'admin', 'be824c2c49a2a2fec68403d8c228d798', '13733871170', 'admin', 1, NULL, 1, 1323171761340022784, '2021-03-28 16:19:26', 1323171761340022784, '2021-03-28 16:19:26');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (1, 1, 1);
INSERT INTO `sys_user_role` VALUES (1323987657704865792, 1323982582911598592, 1);
INSERT INTO `sys_user_role` VALUES (1323987657755197440, 1323982582911598592, 1323987595717246976);
INSERT INTO `sys_user_role` VALUES (1341763494038470656, 1341763493157666816, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1375360299783159808, NULL, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1375360607053676544, NULL, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1376077568624529409, NULL, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1376077568645500929, NULL, 1);
INSERT INTO `sys_user_role` VALUES (1376078441924759554, NULL, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1376083650449190913, NULL, 1323985645063897088);
INSERT INTO `sys_user_role` VALUES (1376086512457691138, 1376086512449355776, 1323985645063897088);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
